from google.appengine.ext import db

""" Define models for tracker project """

class Location(db.Model):
  deviceId = db.StringProperty(multiline=False)
  group = db.StringProperty(multiline=False)
  dateTime = db.DateTimeProperty(auto_now=True, auto_now_add=False)
  location = db.GeoPtProperty()
  speed = db.IntegerProperty(verbose_name="Speed in km/hr")

class Device(db.Model):
  deviceId = db.StringProperty(multiline=False)
  groupId = db.StringProperty(multiline=False)
  letterIdentifier = db.StringProperty(multiline=False)

class Call(db.Model):
  name = db.StringProperty(multiline=False)
  description = db.StringProperty(multiline=True)
  location = db.GeoPtProperty()
  timeAdded = db.DateTimeProperty(auto_now=True, auto_now_add=False)
  active = db.BooleanProperty()